﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace UI.kaoqingguanli
{
    public partial class kqglForm : Form
    {
        public kqglForm()
        {
            InitializeComponent();
        }

        private void kqglForm_Load(object sender, EventArgs e)
        {
            DataTable table=new DataTable();
            table=DAL.UserServer.SelectAllkq().Tables[0];
            /**************************
             * 由于 1 0两个值 会被转化成   boolean所以  有一列会自动转化成checkbox列
             * 所以需要动态增加一列 然后 去判断 增加
             * *****************************/
            DataColumn column = new DataColumn("签到/退");
            table.Columns.Add(column);
            for (int i = 0; i < table.Rows.Count; i++)
            {
                if(Convert.ToBoolean(table.Rows[i][2])==true)
                {
                    table.Rows[i][4] = "签到";
                }else{
                    table.Rows[i][4]="签退";
                   }
            }
            table.Columns.RemoveAt(2);

             //   table.Rows[0][2] = "xx";
            skinDataGridView1.DataSource =table ;
            
        }

        private void kqglForm_ControlAdded(object sender, ControlEventArgs e)
        {

        }
    }
}
